<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>理解SVG transform坐标变换-rotate旋转变化</title>
        <style>
            svg, .svg {
                background-color: #f0f3f9;
            }
            .svg {
                width: 200px; height: 150px;
            }
            .rect {
                width: 120px; height: 90px;
                position: absolute;
                margin: 30px 0 0 30px;
                border-radius: 10px;
                background-color: #a0b3d6;
            }
            .rotate {
                -webkit-transform: rotate(45deg);
                transform: rotate(45deg);
            }
        </style>
    </head>
    <body>
        <h1>理解SVG transform坐标变换</h1>
        <p><a href="https://www.zhangxinxu.com/wordpress/2015/10/understand-svg-transform/">来源</a></p>
        <p><strong>CSS3控制的45度旋转</strong></p>
        <div class="svg">
            <div class="rect rotate"></div>
        </div>
        <p><strong>SVG属性控制45度旋转</strong></p>
        <svg width="200" height="150">
            <rect x="30" y="30" width="120" height="90" rx="10" ry="10" fill="#a0b3d6" transform="rotate(45)"></rect>
        </svg>
    </body>
</html>